<?php

  require_once("config.php");
  require_once("include/thumbnail.php");

  $image = $_GET['name'];
  $c     = ($_GET['c']) ? $_GET['c'] : 0;
  $s     = ($_GET['s']) ? $_GET['s'] : 0;

  $imgDir = "uploads/";
  $colors = array(0xC0BEBF, 0xFFFFFF, 0xF9F9E2);
  $sizeW  = array($thumbWidth, 50);
  $sizeH  = array($thumbHeight, 50);

  $thumb = new cThumbnail($imgDir.$image, $sizeW[$s], $sizeH[$s], $colors[$c]);
  $thumb->output();

?>